﻿using System.Collections.Generic;
using eCommMongo.Core.Domain.Products;

namespace eCommMongo.Service.Products
{
    public interface IProductService
    {
        void DeleteProduct(string productId);

        Product GetProductById(string productId);

        IList<Product> GetAllProducts();


        void InsertProduct(Product product);
        void UpdateProduct(Product product);


        ProductInfoInsertResult InsertProductInfo(ProductInfoInsertRequest productInfoInsertRequest);
        ProductInfoUpdateResult UpdateProductInfo(ProductInfoUpdateRequest productInfoUpdateRequest);



        ProductVariant GetProductVariantById(string productVariantId);
        ProductVariant GetProductVariantBySku(string sku);

        string InsertProductVariantInfo(string productId, string name, string sku, decimal price, int displayOrder, int stockQuantity, string pictureId, bool published);
        void UpdateProductVariantInfo(string productVariantId, string name, string sku, decimal price, int displayOrder, int stockQuantity, string pictureId, bool published);

        IList<ProductVariant> GetProductVariantsByProductId(string productId);

        void DeleteProductVariant(ProductVariant productVariant);
        void AdjustInventory(ProductVariant productVariant, bool decrease,int quantity, string attributesXml);

        IList<ProductAttribute> GetAllProductAttributes();
        string InsertProductVariantAttribute(string pvId, AttributeControlType selectedAttributeType,int selectedProductAttributeId);

        IList<SpecificationAttribute> GetAllSpecificationAttribute();
        void InsertProductSpecificationAttribute(string productId, string specificationAttributeOptionId);


        string InsertProductPicture(string productId, string pictureId, int displayOrder);

        IList<ProductVariantAttribute> GetProductVariantAttributesByProductVariantId(string productVariantId);
        ProductVariantAttribute GetProductVariantAttributeByProductVariantAttributeId(string productVariantAttributeId);
        int InsertProductVariantAttributeValue(string productVariantAttributeId, string productVariantAttributeValue, int displayOrder);
        ProductVariantAttributeValue GetProductVariantAttributeValueByProductVariantAttributeValueId(string productVariantAttributeValueId);
        void DeleteProductVaraintAttribute(string productvariantattributeId);
        void DeleteProductVaraint(string productVariantId);
        void DeleteProductVaraintAttributeValue(string productvariantattributeValueId);
        void DeleteProductPicture(string productPictureId);
    }
}